package com.swss.g.assets.action;

import java.io.File;
import java.net.URLEncoder;
import java.util.List;

import com.swss.g.assets.bean.Asset;
import com.swss.g.assets.bean.AssetChageSearch;
import com.swss.g.assets.bean.AssetSearch;
import com.swss.g.assets.bean.AstChangeApply;
import com.swss.g.assets.bean.AstChangeFinAduit;
import com.swss.g.assets.bean.AstRange;
import com.swss.g.assets.bean.ChangeAsset;
import com.swss.g.assets.service.AssetService;
import com.swss.g.assets.service.ChangeService;
import com.swss.g.base.BaseAction;
import com.swss.g.sys.service.ByglService;
import com.swss.g.sys.service.CurrentPeriodService;
import com.swss.g.sys.service.SysService;
import com.swss.g.user.bean.Role;
import com.swss.g.user.bean.User;
import com.swss.g.user.service.UserService;
import com.swss.util.BeanUtils;
import com.swss.util.Excel;
import com.swss.util.Files;
import com.swss.util.Pagination;

public class changeAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3016348148306946228L;
	private String date;
	private List<?> fundSubList;
	private List<?> useDirList;
	private List<?> nowStatusList;
	private List<?> astSourceList;
	private List<?> chargeOffDeptList;
	private List<?> applyMethodList; //处置方式(现状)
	private List<?> applyResultList;
	private List<?> byglList;
	private List<?> zjfsList;
	private List<?> financeUserList;

	// 资产列表
	private List<?> astList;

	// 上传图片
	private File[] pics;
	private String[] picFileNames;
	private String[] picContentTypes;
	// 上传发票
	private File bill;
	private String billFileName;
	private String billContentTypes;
	// 资产类型
	private char astType;
	// 变动功能 1.处置申请 2.增减值申请
	private Integer t;
	// 条件查询类别 登记、处置、审核等
	private Integer searchType;
	// 条件session 是否清空
	private String auditNoArray;
	// 查询菜单或条件查询标记
	private Integer clearbean;
	// 标记说明： 1.申报管理 2.处置初审3.处置财务审4.处置终审
	private Integer funtype;
	//记录变动单据号
	private String chageBillNo;
	// 高级查询hql
	protected String hql;

	/**
	 * bean
	 */

	private User user;

	private Pagination<?> pagination;

	private Role role;

	private Asset asset;
	
	private AstRange astRange;
	
	private AstChangeApply astChangeApply;
	
	private ChangeAsset changeAsset;
	private AstChangeFinAduit astChangeFinAduit;

	/**
	 * service
	 * 
	 * @return
	 */
	private AssetService assetService;
	private ChangeService changeService;
	private CurrentPeriodService currentPeriodService;
	private UserService userService;
	private SysService sysService;
	private ByglService gbyglService;

	// 处置申报(报废等)查询
	@SuppressWarnings("unchecked")
	public String findChangeApply() {
		try {
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			this.code=-1;
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
				this.code=0;
			}
			AssetSearch as=this.getAssetSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.changeService.findChangeApplyByExample(pagination, as.getAsset(),as.getAstRange(),deptNo,as.getHql());
			pagination.setUrl("/swss" + this.getRequest().getServletPath());
			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return INPUT;
		}
			return "resChangeApply";
	}
	// 处置申报(增减值)查询
	@SuppressWarnings("unchecked")
	public String findChangeApplyAdd() {
		try {
			
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			this.code=-1;
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
				this.code=0;
			}
			AssetSearch as=this.getAssetSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.changeService.findChangeApplyByExample(pagination,as.getAsset(),as.getAstRange(),deptNo,as.getHql());
			pagination.setUrl("/swss" + this.getRequest().getServletPath());
			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return INPUT;
		}
			return "resChangeApplyAdd";
	}
	@SuppressWarnings("unchecked")
	public String findChangeAduit() {
		try {
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.changeService.findAll(pagination);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return INPUT;
		}
		return "resChangeAduit";
	}

	// 初始化申报(变动申请)界面
	public String initChange() {
         
		try {
			this.t = Integer.parseInt(this.getRequest().getParameter("type"));
			this.auditNoArray = this.getRequest().getParameter("auditNoArray");
			applyMethodList = this.getSysService().getApplyMethod();
			applyResultList = this.getSysService().getApplyResult();
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		if (this.t == 1)
			return "applyPage";
		else
			return "applyValuePage";
	}

	// 申报-变动申请
	public String applyChange() {
        
		try{
			this.t=Integer.parseInt(this.getRequest().getParameter("type"));
			this.auditNoArray=this.getRequest().getParameter("auditNoArray");
			if(astChangeApply!=null){
				//获取变动单据号
			    chageBillNo=this.getCurrentPeriodService().getChangeBillNo('S');
				this.getChangeService().goApply(astChangeApply, auditNoArray,chageBillNo);
			}
			this.code=0;
			this.msg = URLEncoder.encode("申报处置成功", "utf-8");
		
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		if (this.t == 1) // 申请返回结果
			return "findChangeApply";
		else // 增减值申请返回结果
			return "findChangeApplyAdd";
	}
    /**
     * 申报管理
     * findChangeApplyAduitByExample()最后参数说明：1.申报管理、2.初审、3.财审、4.终审查询
     * @return
     */
	@SuppressWarnings("unchecked")
	public String chageManage(){
	try{
		String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
		if(this.msg!=null){
			this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
		}
		chargeOffDeptList = this.getSysService().getChargeOffDept();
		AssetChageSearch acs=this.getAssetChageSearchByType("S");
		if (this.pagination == null) {
			pagination = new Pagination();
		}
		pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),1);
		pagination.setUrl("/swss" + this.getRequest().getServletPath());

		if (this.pagination.getRowcount() == 0)
			this.msg = "无满足条件的记录";
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "resChangeMageAduit";
	}
	/**
	 * 申报撤销
	 * @return
	 */
	public String delChange() {
        
		try{
			if(this.getRequest().getParameter("funtype")!=null)
				this.funtype=Integer.parseInt(this.getRequest().getParameter("funtype"));
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			if (auditNoArray != null){
				this.code = this.getChangeService().changeAstDeleteAll(auditNoArray);
			    this.msg = URLEncoder.encode("撤销成功", "utf-8");
			}
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		if (this.funtype == 1)
			return "applyChageBack";
		else
			return "applyFirstChageBack";
	}
	/**
	 * 查询单一处置资产准备
	 * @return
	 */
	public String searchChageOneAst() {

		try {
			fundSubList = this.getSysService().getFundSub();
			useDirList = this.getSysService().getUseDir();
			nowStatusList = this.getSysService().getNowStatus();
			astSourceList = this.getSysService().getAstSource();
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			byglList=this.getGbyglService().findAllStandField();
			zjfsList=this.getSysService().getZheJiuFangShi();

			changeAsset = (ChangeAsset) this.getChangeService().findChageOneById(changeAsset.getId());
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "searchChageShow";
	}
	/**
	 * 处置资产初审查询
	 * findChangeApplyAduitByExample() 末尾参数含义：1.申报管理2.处置初审3.处置财务初审4.处置终审
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public String findChangeFirstAduit(){
		try{
			
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
			}
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			AssetChageSearch acs=this.getAssetChageSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),2);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());
			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
			}catch(Exception e){
				e.printStackTrace();
				return INPUT;
			}
		return "findApplyFirstAduit";
	}
	/**
	 * 处置初审
	 * @return
	 */
	public String goChangFirstAduit() {
		try {
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			if (auditNoArray != null) {
				this.code = this.getChangeService().FirstChangeAuditUpdate(auditNoArray);
				this.msg = URLEncoder.encode("审核成功", "utf-8");
			}
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "resFindApplyFirstAduit";
	}
	/**
	 * 处置资产财务审查询
	 * findChangeApplyAduitByExample(xx,xx,xx) 末尾参数含义：1.申报管理2.处置初审3.处置财务初审4.处置财务恢复5.处置终审
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public String findChangeFinanceAduit(){
		try{
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
			}
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			AssetChageSearch acs=this.getAssetChageSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),3);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());

			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
			}catch(Exception e){
				e.printStackTrace();
				return INPUT;
			}
		return "findApplyFinanceAduit";
	}
	/**
	 * 通过审核页面初始化
	 * @return
	 */
	public String initGoFinanceAduit(){
		
		//填充页面下拉框
		String finUser = this.getSessionAttr("user",User.class).getFin().toString(); 
	    auditNoArray = this.getRequest().getParameter("auditNoArray");
		
		try{
			financeUserList = this.sysService.getFinanceUser(finUser);
			fundSubList=this.sysService.getFundSub();
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "showGoFinanceAduit";
	}
	/**
	 * 处置财务审
	 * @return
	 */
	public String goChangFinanceAduit() {
		try {
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			if (auditNoArray != null) {
				this.code = this.getChangeService().FinanceChangeAuditUpdate(auditNoArray,astChangeFinAduit);
				this.msg = URLEncoder.encode("审核成功", "utf-8");
			}
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "resFindApplyFinanceAduit";
	}
	/**
	 * 处置财审退回初审页面初始化
	 * @return
	 */
	public String initBackFinanceaduit(){
		try{
			auditNoArray = this.getRequest().getParameter("auditNoArray");
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "gobackFinanceaduit";
	}
	/**
	 * 处置财务审核退回 2
	 * @return
	 */
	public String backChangeFinanceAduit(){
		
		try{
			String returreas = this.getRequest().getParameter("returreas");
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			this.code=this.getChangeService().astChangeFinAuditBack(auditNoArray,returreas);
			this.msg = URLEncoder.encode("退回成功","utf-8");
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "findApplyFinanceNotAduit";
	}
	/**
	 * 处置恢复财审查询
	 * findChangeApplyAduitByExample(xx,xx,xx) 第三个参数含义：1.申报管理2.处置初审3.处置财务审4.处置财务恢复5.处置终审
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public String findChangeFinancethroughAduit(){
		try{
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
			}
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			AssetChageSearch acs=this.getAssetChageSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),4);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());

			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
			}catch(Exception e){
				e.printStackTrace();
				return INPUT;
			}
		return "findApplyFinanceThroughAduit";
	}
	/**
	 *  恢复处置财审
	 *  return
	 */ 
	public String recoveryChangeFinancethroughAduit(){
		try{
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			this.code=this.changeService.astChangeFinthroughAudit(auditNoArray);
			this.msg = URLEncoder.encode("恢复成功","utf-8");
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "findApplyChageFinrecoveryAduit";
	}
	/**
	 * 处置终审查询
	 * findChangeApplyAduitByExample(xx,xx,xx) 第三个参数含义：1.申报管理2.处置初审3.处置财务初审4.处置财务回复5.处置终审
	 * @return
	 */
    @SuppressWarnings("unchecked")
	public String findChangeLastAduit(){
    	try{
    		String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			if(this.msg!=null){
				this.msg=new String(msg.getBytes("iso8859-1"), "UTF-8");
			}
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			AssetChageSearch acs=this.getAssetChageSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),5);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());

			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
    	}catch(Exception e){
    		e.printStackTrace();
    		return INPUT;
    	}
    	return "findApplyChageLastAduit";
    }
    /**
	 * 处置终审
	 * @return
	 */
	public String goChangLastAduit() {
		try {
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			if (auditNoArray != null) {
				this.code = this.getChangeService().LastChangeAuditUpdate(auditNoArray);
				this.msg = URLEncoder.encode("审核成功", "utf-8");
			}
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "resFindApplyLastAduit";
	}
	// 处置终审退回页面初始化
	public String initBackChangeduit() {
		try {
			auditNoArray = this.getRequest().getParameter("auditNoArray");
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "gobackApplyaduit";
	}
	/**
	 *  处置终审退回 状态为4
	 * @return
	 */
	public String backChangeLastAduit() {
		try {
			String returreas = this.getRequest().getParameter("returreas");
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			this.code = this.changeService.astChangeLastAuditBack(auditNoArray,returreas);
			this.msg = URLEncoder.encode("退回成功", "utf-8");

		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}

		return "resFindApplyLastAduit";
	}
	/**处置恢复
	 * findChangeApplyAduitByExample(xx,xx,xx)
	 * 第三个参数含义：1.申报管理2.处置初审3.处置财务初审4.处置财务回复5.处置终审6.处置恢复
	 */
	@SuppressWarnings("unchecked")
	public String findChangeApplyRecovery(){
		try {
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			if (this.msg != null) {
				this.msg = new String(msg.getBytes("iso8859-1"), "UTF-8");
			}
			chargeOffDeptList = this.getSysService().getChargeOffDept();
			AssetChageSearch acs=this.getAssetChageSearchByType("S");
			if (this.pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.getChangeService().findChangeApplyAduitByExample(pagination,acs.getChangeAsset(),acs.getAstRange(),deptNo,acs.getHql(),6);
			pagination.setUrl("/swss" + this.getRequest().getServletPath());

			if (this.pagination.getRowcount() == 0)
				this.msg = "无满足条件的记录";
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}
		return "resApplyRecoveryReg";
	}
	public String goChangeRecoveryApplyAduit(){
		try{
			auditNoArray = this.getRequest().getParameter("auditNoArray");
			this.code = this.changeService.ChangeRecoveryApplyAduit(auditNoArray);
			this.msg = URLEncoder.encode("恢复成功", "utf-8");
		}catch(Exception e){
			e.printStackTrace();
			return INPUT;
		}
		return "findChageApplyRecoveryReg";
	}
	/**
	 * 输入EXCEL表格
	 * @param exportType=1财务审核查询使用，2在账查询使用
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public String down_excel(){
		try {
			Integer exportType=Integer.parseInt(this.getRequest().getParameter("exportType"));
			String deptNo = this.getSessionAttr("user", User.class).getDeptNo().trim();
			this.getChageAssetType("S");
			if (pagination == null) {
				pagination = new Pagination();
			}
			pagination = this.changeService.findExcelExportByExample(pagination,changeAsset,deptNo,exportType);
				// 生成excel文件(保存在服务器机上)
				Excel.writeAssetExcel(pagination.getResult(),1);
				// 导出文件(下载到客户机上,并删除服务器机上的excel文件)
				Files.exportFile(this.getResponse(),true);
			
		} catch (Exception e) {
			e.printStackTrace();
			return INPUT;
		}

		return null;
	}
	/**
     * 判断Chageasset对象是否为条件查询或默认查询内容
     * 对相关系统 设备，家具等设置标记 astmark S、Q等
     * @return
     */
    public ChangeAsset getChageAssetType(String astType) {
		// clearbean=1 清空session
		if (this.clearbean != null && this.clearbean == 1) {
			this.setSessionAttr("searchBean", null);
		  } else {
			if (changeAsset != null) {
				this.setSessionAttr("searchBean", changeAsset);
			} else {
				changeAsset = this.getSessionAttr("searchBean", null);
			}
		}
		if (changeAsset == null) {
			changeAsset = new ChangeAsset();
			changeAsset.setAstMark(astType);
			
		} else
			changeAsset.setAstMark(astType);
		return changeAsset;
	}
    /**
     * 判断asset对象是否为条件查询或默认查询内容
     * 对相关系统 设备，家具等设置标记 astmark S、Q等
     * @return
     */
    public Asset getAssetType(String astType) {
		// clearbean=1 清空session
		if (this.clearbean != null && this.clearbean == 1) {
			this.setSessionAttr("searchBean", null);
		  } else {
			if (asset != null) {
				this.setSessionAttr("searchBean", asset);
			} else {
				asset = this.getSessionAttr("searchBean", null);
			}
		}
		if (asset == null) {
			asset = new Asset();
			asset.setAstMark(astType);
		} else
			asset.setAstMark(astType);
		return asset;
	}
    /**
     * 处置Main表组合查询 （通用、高级）
     * @param astType
     * @return
     */
    public AssetSearch getAssetSearchByType(String astType){
		//clearbean=1 清空 session
		AssetSearch as = null;
		if(this.clearbean!=null && this.clearbean==1){
			as = new AssetSearch();
			as.setAsset(asset);
			as.setAstRange(astRange);
			as.setHql(hql);
			this.setSessionAttr("searchBean", null);
		}else{
			if (asset != null || hql != null || astRange != null) {
				as = this.getSessionAttr("searchBean", null);
				if (as == null) {
					as = new AssetSearch();
				}
				if (hql != null) {
					as.setAsset(null);
					as.setHql(hql);
					as.setAstRange(null);
				}
				if (astRange != null) {
					as.setAsset(null);
					as.setAstRange(astRange);
					as.setHql(null);
				}
				if (asset != null) {
					if (asset != null) {
						Asset ast = as.getAsset();
						if (ast == null) {
							ast = new Asset();
						} else {
							if ((ast.getDeptNo() != null)
									|| (ast.getFinAccount() != null)
									|| (ast.getFinDeptName() != null)) {
								ast = new Asset();
							}
						}
						BeanUtils.copyProperties(asset, ast);
						as.setAsset(ast);
					}
				}
				this.setSessionAttr("searchBean", as);
			} else {
				as = this.getSessionAttr("searchBean", null);
			}
		}
		if (as == null) {
			as = new AssetSearch();
		}
		if (as.getAsset() == null) {
			Asset ast = new Asset();
			ast.setAstMark(astType);
			as.setAsset(ast);
		} else {
			as.getAsset().setAstMark(astType);
		}
		return as;
	}
    /**
     * 处置ChangeMain表组合查询 （通用、高级）
     * @param astType
     * @return
     */
    public AssetChageSearch getAssetChageSearchByType(String astType){
    	//clearbean=1 清空 session
		AssetChageSearch acs = null;
		if(this.clearbean!=null && this.clearbean==1){
			acs = new AssetChageSearch();
			acs.setChangeAsset(changeAsset);
			acs.setAstRange(astRange);
			acs.setHql(hql);
			this.setSessionAttr("searchBean", null);
		}else{
			if (changeAsset != null || hql != null || astRange != null) {
				acs = this.getSessionAttr("searchBean", null);
				if (acs == null) {
					acs = new AssetChageSearch();
				}
				if (hql != null) {
					acs.setChangeAsset(null);
					acs.setHql(hql);
					acs.setAstRange(null);
				}
				if (astRange != null) {
					acs.setChangeAsset(null);
					acs.setAstRange(astRange);
					acs.setHql(null);
				}
				if (changeAsset != null) {
					if (changeAsset != null) {
						ChangeAsset cast = acs.getChangeAsset();
						if (cast == null) {
							cast = new ChangeAsset();
						} else {
							if ((cast.getDeptNo() != null)
									|| (cast.getFinAccount() != null)
									|| (cast.getFinDeptName() != null)) {
								cast = new ChangeAsset();
							}
						}
						BeanUtils.copyProperties(changeAsset, cast);
						acs.setChangeAsset(cast);
					}
				}
				this.setSessionAttr("searchBean", acs);
			} else {
				acs = this.getSessionAttr("searchBean", null);
			}
		}
		if (acs == null) {
			acs = new AssetChageSearch();
		}
		if (acs.getChangeAsset()==null) {
			ChangeAsset cast = new ChangeAsset();
			cast.setAstMark(astType);
			acs.setChangeAsset(cast);
		} else {
			acs.getChangeAsset().setAstMark(astType);
		}
		return acs;
    }
	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Pagination<?> getPagination() {
		return pagination;
	}

	public void setPagination(Pagination<?> pagination) {
		this.pagination = pagination;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public SysService getSysService() {
		return sysService;
	}

	public void setSysService(SysService sysService) {
		this.sysService = sysService;
	}

	public List<?> getFundSubList() {
		return fundSubList;
	}

	public void setFundSubList(List<?> fundSubList) {
		this.fundSubList = fundSubList;
	}

	public List<?> getUseDirList() {
		return useDirList;
	}

	public void setUseDirList(List<?> useDirList) {
		this.useDirList = useDirList;
	}

	public List<?> getNowStatusList() {
		return nowStatusList;
	}

	public void setNowStatusList(List<?> nowStatusList) {
		this.nowStatusList = nowStatusList;
	}

	public List<?> getAstSourceList() {
		return astSourceList;
	}

	public void setAstSourceList(List<?> astSourceList) {
		this.astSourceList = astSourceList;
	}

	public CurrentPeriodService getCurrentPeriodService() {
		return currentPeriodService;
	}

	public void setCurrentPeriodService(
			CurrentPeriodService currentPeriodService) {
		this.currentPeriodService = currentPeriodService;
	}

	public Asset getAsset() {
		return asset;
	}

	public void setAsset(Asset asset) {
		this.asset = asset;
	}

	public AssetService getAssetService() {
		return assetService;
	}

	public void setAssetService(AssetService assetService) {
		this.assetService = assetService;
	}

	public List<?> getChargeOffDeptList() {
		return chargeOffDeptList;
	}

	public void setChargeOffDeptList(List<?> chargeOffDeptList) {
		this.chargeOffDeptList = chargeOffDeptList;
	}

	public File[] getPic() {
		return pics;
	}

	public void setPic(File[] pic) {
		this.pics = pic;
	}

	public String[] getPicFileName() {
		return picFileNames;
	}

	public void setPicFileName(String[] picFileName) {
		this.picFileNames = picFileName;
	}

	public String[] getPicContentType() {
		return picContentTypes;
	}

	public void setPicContentType(String[] picContentType) {
		this.picContentTypes = picContentType;
	}

	public File getBill() {
		return bill;
	}

	public void setBill(File bill) {
		this.bill = bill;
	}

	public String getBillFileName() {
		return billFileName;
	}

	public void setBillFileName(String billFileName) {
		this.billFileName = billFileName;
	}

	public String getBillContentTypes() {
		return billContentTypes;
	}

	public void setBillContentTypes(String billContentTypes) {
		this.billContentTypes = billContentTypes;
	}

	public char getAstType() {
		return astType;
	}

	public void setAstType(char astType) {
		this.astType = astType;
	}

	public List<?> getAstList() {
		return astList;
	}

	public void setAstList(List<?> astList) {
		this.astList = astList;
	}

	public Integer getT() {
		return t;
	}

	public void setT(Integer t) {
		this.t = t;
	}

	public ChangeService getChangeService() {
		return changeService;
	}

	public void setChangeService(ChangeService changeService) {
		this.changeService = changeService;
	}

	public String getAuditNoArray() {
		return auditNoArray;
	}

	public void setAuditNoArray(String auditNoArray) {
		this.auditNoArray = auditNoArray;
	}

	public Integer getClearbean() {
		return clearbean;
	}

	public void setClearbean(Integer clearbean) {
		this.clearbean = clearbean;
	}

	public Integer getSearchType() {
		return searchType;
	}

	public void setSearchType(Integer searchType) {
		this.searchType = searchType;
	}
	public List<?> getApplyMethodList() {
		return applyMethodList;
	}
	public void setApplyMethodList(List<?> applyMethodList) {
		this.applyMethodList = applyMethodList;
	}
	public List<?> getApplyResultList() {
		return applyResultList;
	}
	public void setApplyResultList(List<?> applyResultList) {
		this.applyResultList = applyResultList;
	}
	public AstChangeApply getAstChangeApply() {
		return astChangeApply;
	}
	public void setAstChangeApply(AstChangeApply astChangeApply) {
		this.astChangeApply = astChangeApply;
	}
	public ChangeAsset getChangeAsset() {
		return changeAsset;
	}
	public void setChangeAsset(ChangeAsset changeAsset) {
		this.changeAsset = changeAsset;
	}
	public Integer getFuntype() {
		return funtype;
	}
	public void setFuntype(Integer funtype) {
		this.funtype = funtype;
	}
	public List<?> getByglList() {
		return byglList;
	}
	public void setByglList(List<?> byglList) {
		this.byglList = byglList;
	}
	public List<?> getZjfsList() {
		return zjfsList;
	}
	public void setZjfsList(List<?> zjfsList) {
		this.zjfsList = zjfsList;
	}
	public ByglService getGbyglService() {
		return gbyglService;
	}
	public void setGbyglService(ByglService gbyglService) {
		this.gbyglService = gbyglService;
	}
	public List<?> getFinanceUserList() {
		return financeUserList;
	}
	public void setFinanceUserList(List<?> financeUserList) {
		this.financeUserList = financeUserList;
	}
	public AstChangeFinAduit getAstChangeFinAduit() {
		return astChangeFinAduit;
	}
	public void setAstChangeFinAduit(AstChangeFinAduit astChangeFinAduit) {
		this.astChangeFinAduit = astChangeFinAduit;
	}
	public String getChageBillNo() {
		return chageBillNo;
	}
	public void setChageBillNo(String chageBillNo) {
		this.chageBillNo = chageBillNo;
	}
	public AstRange getAstRange() {
		return astRange;
	}
	public void setAstRange(AstRange astRange) {
		this.astRange = astRange;
	}
	public String getHql() {
		return hql;
	}
	public void setHql(String hql) {
		this.hql = hql;
	}
    
}
